package com.neusoft.tyut.tyutcat;

import com.neusoft.tyut.tyutcat.config.NetConfig;
import com.neusoft.tyut.tyutcat.core.CatThread;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class CatMain {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = new ServerSocket(NetConfig.MSG_PORT);
        System.out.println("服务器启动");
        while ( NetConfig.RUNNING ){
            System.out.println("等待连接");
            Socket socket = serverSocket.accept();
            System.out.println("连接成功");
            new CatThread(socket).start();
            System.out.println("已经收到IE的请求，并且启动了执行线程.......");

        }


    }
}
